﻿using KinonekoSoftware.Foundation.IO;
using LiteDB;

namespace KinonekoSoftware.Studio.Utils.Transformers
{
    public abstract class Transformer
    {
        public static readonly Transformer[] Transformers = new Transformer[]
        {
            new InstanceCacheTransformer(),
            new InstanceTransformer(),
            new RepositoryTransformer(),
            new ConceptTransformer(),
        };


        /// <summary>
        /// 检查目录是否存在
        /// </summary>
        /// <param name="directory">要检查的目录</param>
        /// <returns>返回目录路径。</returns>
        public static string CheckDirectory(string directory) => FolderHelper.CheckDir(directory);

        public abstract void Migrate(TransformContext context);
    }
}